<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script>
		Array.prototype.myMap = function(fn){
			for(var i=0;i<this.length;i++){
				var item = this[i];
				fn(item,i);
			}
		}
		
		var arr = ['我是第一','我是第二','我是第三'];
		arr.myMap(function(list,index){
			alert(list+','+index);
		});
	</script>
</html>
